//
//  MPNavigationBar.swift
//  Venus
//
//  Created by qurongxiang on 2018/7/24.
//  Copyright © 2018年 zhaowang. All rights reserved.
//

import UIKit

class MPNavigationBar: UINavigationBar {
    
    override func layoutSubviews() {
        super.layoutSubviews()
        for subview in self.subviews {
            let stringFromClass = NSStringFromClass(subview.classForCoder)
            if stringFromClass.contains("BarBackground") {
                subview.frame = self.bounds
            } else if stringFromClass.contains("UINavigationBarContentView") {
                subview.clipsToBounds = false
                subview.frame = CGRect(x: 0, y: LayoutCommon.isBangs() ? 44 : 20, width: LayoutCommon.width, height: 64)
            }
        }
    }
}
